home *** CD-ROM | disk | FTP | other *** search
- Path: news.uit.no!news
- From: nilss@stud.cs.uit.no (Nils Peter Sudmann)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Removing a patch - solved?
- Date: 30 Jan 96 18:20:28 +0100
- Organization: University of Tromsoe, Norway
- Message-ID: <1433.6603T1100T1439@stud.cs.uit.no>
- References: <1996Jan22.150212.23377@ludens> <4e1p58$4l2@misery.millcomm.com> <815.6602T1142T756@norconnect.no>
- NNTP-Posting-Host: uit-or4.uit.no
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
- On 29-Jan-96 20:53:41, Kenneth C. Nilsen (kenneth@norconnect.no) wrote:
- >>genie@ludens.elte.hu wrote:
- >>: - Has the removing of a patch problem been already solved?
- >>Nope. I gave it a try myself, but ran in to the Exception processing
- >>problem.
-
- >You have to remove the patches the opposite way they where installed. A
- >patch has to check the pointer it got when first installed and compare it to
- >the pointer it gets when removing it selv. If they are not alike it have to
- >reinstall with this new pointer and wait. As you can see this is a critical
- >point cause there is a theoretical possibility that other programs patches
- >this vector while ours is comparing pointers.
-
- This critical point is easily avoided by enclosing the check with a
- forbid()/permit(). This is not the problem. The problem is that some program
- could be executing inside your patched code (and currently waiting for a time
- slice). AFAIK there is *no* way to safely know when the last thread of control
- has left your code (and you may unload it). So a patch should actually never
- remove itself (only render itself inactive). I did miss the previous patch
- discussion, but I wrote one myself and came to the above conclusion. Right or
- wrong?
-
- --
- Nils Peter Sudmann // Using Thor v2.21/#1113, sign v1.5
- "Truth, a random variable possibly // EMAIL: nilss@stud.cs.uit.no
- containing complex numbers" // WWW: http://www.cs.uit.no/~nilss
-
-
-